< previous page page_482 next page >

Page 482
(table continued from previous page)
PropertyDescription
CursorTypeThe cursor type you want to use for the recordset. This is discussed in more detail a little later in this chapter.
LockTypeThe locking mechanism you want to use if youre editing records in the recordset. This is discussed in more detail a little later in this chapter.
MaxRecordsThe maximum number of records to return after you open a recordset. You may use this when testing what would otherwise be a very large recordset. For example, if you need to loop through a table that has one million rows, you could set this property to 200, and youll simulate processing all the rows, even though just 200 are returned.
SourceIn this property, you fill in a value thats used to create the Recordset object. This value can be a stored procedure name, a table name, or a SQL SELECT statement. This value can also be an ADO Command object. Youll learn more about the ADO Command object later in this chapter.
StateThis property returns the current state of the recordset: It can be Open, Closed, Fetching, Connecting, or Executing. You would use this if you werent sure whether a recordset was open. Also, if the recordset is closed, you may need to open it.

Methods of the Recordset Object
Like the properties of the Recordset object, only some of the methods are really useful, so Table 24.4 only lists those needed for learning the basics of ADO.
Table 24.4 Methods of the Recordset Object.
Method NameDescription
AddNewAdds a new record to the recordset and the cursor is positioned to that record. All new records are added to the end of the recordset.
CancelUpdateCancels a pending write operation to the recordset if youve either modified the columns in the buffer or issued an AddNew method. You cannot call this method if you havent performed either of these operations. If youve already called an Update method, this method will generate a trappable error.

(table continued on next page)

 
< previous page page_482 next page >

If you like this book, buy it!